<template>
  <div>
    <el-form
      ref="addRuleFormRef"
      :inline="true"
      :model="addRuleForm"
      class="demo-form-inline"
      label-position="right"
    >
      <el-row>
        <el-col :span="12">
          <el-form-item label="网络防火墙密码" prop="firewall_password">
            <el-input
              v-model="addRuleForm.firewall_password"
              placeholder="达到错误次数后锁定用户"
              clearable
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row class="button_row">
        <el-col :span="24">
          <el-form-item>
            <el-button type="primary" @click="submitForm"> 确定 </el-button>
            <el-button @click="onReset">取消</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script  setup>
import { ref } from 'vue'

const addRuleFormRef = ref()
const addRuleForm = ref({
  firewall_password: ''
})

// // 提交
const submitForm = () => {
  console.log(addRuleForm.value)
}
// // 重置
const onReset = (formEl) => {
  addRuleForm.value = {
    firewall_password: ''
  }
}
</script>

<style lang="scss" scoped>
.button_row {
  text-align: center;
  margin-top: 30px;
}
</style>
